package controlisolation.lifecyclefsm.stateexecutor;


public class WorkStatus {

    private StateWork _work;

    public WorkStatus(StateWork work)
    {
        _work=work;
    }
    
    public Exception getAssociatedException() {
        return _associatedException;
    }

    public void setAssociatedException(Exception associatedException) {
        this._associatedException = associatedException;
    }

    public int getCode() {
        return _code;
    }

    public void setCode(int code) {
        this._code = code;
    }

    public String getDescription() {
        return _description;
    }

    public void setDescription(String description) {
        this._description = description;
    }

    public StatusMessageType getStatusMessageType() {
        return _statusMessageType;
    }

    public void setStatusMessageType(StatusMessageType statusMessageType) {
        this._statusMessageType = statusMessageType;
    }

    public StateWork getWork() {
        return _work;
    }

    public void setWork(StateWork work) {
        this._work = work;
    }
    
    public enum StatusMessageType {INFO,WARNING,ERROR};
    private StatusMessageType _statusMessageType;
    private Exception _associatedException;
    private int _code;
    private String _description;
    
    public String toString()
    {
        StringBuffer strb=new StringBuffer();
        strb.append("["+_statusMessageType+"]");
        strb.append("["+_code+"]");
        strb.append("["+_associatedException+"]");
        strb.append("["+_description+"]");
        strb.append("\n");
        return strb.toString();
    }
}
